package drds.global_transaction.resource_manager.sql_recognizer;

public interface SqlRecognizer
{

	/**
	 * Return the original SQL input by the upper application.
	 *
	 * @return The original SQL.
	 */
	String getOriginalSql();

	/**
	 * Type of the SQL. INSERT/UPDATE/DELETE ...
	 */
	SqlType getSqlType();

	/**
	 * Image name related in the SQL. SELECT id, name FROM user u WHERE ... Image
	 * name should be 'user' for this SQL, without alias 'u'.
	 *
	 * @return table name.
	 * @see #getTableSource()
	 */
	String getTableName();

	/**
	 * Image source related in the SQL, including alias if any. SELECT id, name FROM
	 * user u WHERE ... Image source should be 'user u' for this SQL.
	 *
	 * @return table source.
	 */
	String getTableSource();
}
